com.supermap.analyst.spatialanalyst

Class OverlayAnalyst

  • java.lang.Object
    • com.supermap.analyst.spatialanalyst.OverlayAnalyst


  • public class OverlayAnalyst
    extends java.lang.Object
    Overlay analysis class

    This class is used to perform various overlay operations on two input data sets or recordsets, such as clip, erase, union, identity, (XOR) and update (update).

    Overlay analysis is a very important spatial analysis function in GIS. Refers to the process of generating a new data set by a series of set operations on two datasets under a unified spatial reference system. Overlay analysis is widely used in resource management, urban construction assessment, land management, agriculture, forestry, animal husbandry, statistics and other fields. Therefore, this overlay analysis class can realize the processing and analysis of spatial data, extract the new spatial geometric information needed by the user, and process the attribute information of the data.

    * note

    1. In the two datasets that are superimposed, the data set, referred to as the input data set (referred to as the first data set in SuperMap GIS), can be a point, a line, a face, etc .; another is called A superimposed data set (referred to as a second data set in SuperMap GIS), whose type is generally a face type.
    2. It should be noted that the surface dataset or the recordset itself should avoid containing overlapping areas, otherwise the overlay results may go wrong.
    3. The data for the overlay analysis must be data with the same geographic reference, including input data and result data.
    4. In the case where the amount of data to be analyzed is large, a spatial index is created for the resulting data set to increase the display speed of the data.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static boolean clip(DatasetVector dataset, DatasetVector clipDataset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      Crop the vector dataset and crop and delete the objects that are not in the cropped dataset (the second dataset) in the cut data set (the first dataset).
      static boolean clip(DatasetVector dataset, Geometry[] clipGeometries, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The vector dataset is cropped and the objects in the data set that are not in the geometric object array are cropped and deleted.
      static boolean clip(Recordset recordset, Recordset clipRecordset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      Cut the recordset and crop and delete the objects in the second record set that are not in the second record set.
      static boolean clipCAD(DatasetVector dataset, Geometry clipRegion, DatasetVector resultDataset, boolean bClipInRegion, boolean bErase, double dTolerace)
      Clips CAD
      static boolean clipText(DatasetVector dataset, Geometry clipRegion, DatasetVector resultDataset, boolean bClipInRegion, boolean bErase, double dTolerace)
      Clips a text dataset
      static boolean erase(DatasetVector dataset, DatasetVector eraseDataset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The overlay analysis used to erase the data set, clipping and deleting the objects contained in the second dataset in the first dataset.
      static boolean erase(DatasetVector dataset, Geometry[] eraseGeometries, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The overlay analysis used to erase the data set, cutting the objects contained in the array of geometric objects in the erased data set and deleting them.
      static boolean erase(Recordset recordset, Recordset eraseRecordset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      An overlay analysis for erasing the recordset, cutting and deleting the objects contained in the second set of records in the first set of records.
      static boolean identity(DatasetVector dataset, DatasetVector identityDataset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      For the data set in the same way the superposition of the analysis, the results of the data set to keep the same operation of the data set of all objects and the same operation of the data set with the same operation for the intersection of the data set of objects.
      static boolean identity(DatasetVector dataset, Geometry[] identityGeometries, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      For the data set in the same way the superposition of the analysis, the results of the data set to keep the same operation of the data set of all objects and the same operation of the data set with the same operation for the intersection of geometric object array object.
      static boolean identity(Recordset recordset, Recordset identityRecordset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      For the superposition of the same set of records, the results of the data set to keep the unified operation of the records of all the objects and the same operation of the recordset and the same operation used to record the intersection of the set of objects.
      static boolean intersect(DatasetVector dataset, DatasetVector intersectDataset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The superposition analysis of the intersection mode is performed, and the data sets to be subjected to the intersection superposition analysis are not included in the data set for the data set used to intersect the superimposition analysis to be cut and deleted.
      static boolean intersect(DatasetVector dataset, Geometry[] intersectGeometries, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The superposition analysis of the intersection mode is performed, and the data set to be subjected to the intersection superposition analysis is not included in the object cut-out and deleted by the array of face objects used to intersect the superimposition analysis.
      static boolean intersect(Recordset recordset, Recordset intersectRecordset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The superposition analysis of the intersecting mode is performed, and the set of records to be subjected to the intersection superposition analysis is not included in the object set in the recording set for intersecting the superimposition analysis to be cut and deleted.
      static boolean union(DatasetVector dataset, DatasetVector unionDataset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The result data is used to collect the data sets of the merged superimposed analysis and all the objects in the data set for merging the superimposed analysis, and the intersecting part is subjected to intersecting and segmentation operations.
      static boolean union(DatasetVector dataset, Geometry[] unionGeometries, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The data set is used to store the data set of the merged overlay analysis and all the objects in the array of face objects used to merge the superimposed analysis, and the intersecting part is subjected to intersecting and segmentation operations.
      static boolean union(Recordset recordset, Recordset unionRecordset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The result data is used to collect the recordsets of the merged overlay analysis and all the objects in the set of records used to merge the superimposed analysis, and the intersecting parts are subjected to intersecting and segmentation operations.
      static boolean update(DatasetVector dataset, DatasetVector updateDataset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      For the overlay analysis of the update of the two data sets, the part of the data set for updating is replaced with the updated data set, which is a process of first erasing and pasting.
      static boolean update(DatasetVector dataset, Geometry[] updateGeometries, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The overlay data set is updated by the overlay method of the face array, and the overlapped part of the array with the updated object is replaced with the updated array of face objects.
      static boolean update(Recordset recordset, Recordset updateRecordset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The overlay analysis is used to update the two sets of recordsets.
      static boolean xOR(DatasetVector dataset, DatasetVector xORDataset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      Symmetric difference operation is performed on two surface datasets.
      static boolean xOR(DatasetVector dataset, Geometry[] xorGeometries, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      The opposite data set uses the surface object array to perform the symmetry difference analysis operation, that is, the intersection negation operation.
      static boolean xOR(Recordset recordset, Recordset xORRecordset, DatasetVector resultDataset, OverlayAnalystParameter parameter)
      Symmetric difference analysis is performed on two sets of records.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • clip

        public static boolean clip(DatasetVector dataset,
                                   DatasetVector clipDataset,
                                   DatasetVector resultDataset,
                                   OverlayAnalystParameter parameter)
        Crop the vector dataset and crop and delete the objects that are not in the cropped dataset (the second dataset) in the cut data set (the first dataset). Note:
        1. The type of the cropped dataset (the second dataset) must be a face, and the reduced data set (first dataset) can be a point, a line, a face.
        2. In the cut data set, only objects that fall within the clipping dataset polygon are output to the result dataset.
        3. Crop the dataset, the geographic coordinates of the data set and the resulting dataset must be consistent.
        4. clip and intersect are consistent in space processing, the difference is that the result of the record set attribute processing, clip analysis is used to do the cut, the result records and the first record set of the same property table structure, where the superposition Analysis parameter object setting is invalid. And the result of intersecting transitions can preserve the fields of the two recordsets according to the field setting.
        5. All overlay results do not take into account the system fields of the dataset.

        Parameters:
        dataset - A reduced data set, also called a first dataset. The type of the data set can be points, lines, and faces.
        clipDataset - The data set used for cropping, also called the second dataset. The dataset type must be surface.
        resultDataset - The data set that holds the cropped results.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing. The object setting is invalid here.
        Returns:
        analysis successful return value is true, failure return value is false.
        Example:
        The following code demonstrates how to crop a line vector dataset.
         public void overlayAnalystClip1() {
                // Returns the vector dataset to be clipped and the vector dataset to be used for clipping
                Workspace workspace = new Workspace();
                String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
                DatasourceConnectionInfo datasourceConnectionInfo = new
                        DatasourceConnectionInfo(rootPath + "/SampleData/shanghai/shanghai.udb",
                                                 "shanghai", "");
                Datasource targetDatasource = workspace.getDatasources().open(
                        datasourceConnectionInfo);
                DatasetVector datasetCliped = (DatasetVector) targetDatasource.
                                              getDatasets().get("Road_L");
                DatasetVector datasetClip = (DatasetVector) targetDatasource.
                                            getDatasets().get("Park_R");
        
                // Create a line dataset to save result.
                String resultDatasetClipName = targetDatasource.getDatasets().
                                               getAvailableDatasetName(
                        "resultDatasetClip");
                DatasetVectorInfo datasetvectorInfoClip = new DatasetVectorInfo();
                datasetvectorInfoClip.setType(DatasetType.LINE);
                datasetvectorInfoClip.setName(resultDatasetClipName);
                datasetvectorInfoClip.setEncodeType(EncodeType.NONE);
                DatasetVector resultDatasetClip = targetDatasource.getDatasets().create(
                        datasetvectorInfoClip);
        
                // Sets overlaying parameters
                OverlayAnalystParameter overlayAnalystParamClip = new
                        OverlayAnalystParameter();
                overlayAnalystParamClip.setTolerance(0.0122055608);
        
                // Calls the clip method to achieve the overlay analysis
                OverlayAnalyst.clip(datasetCliped, datasetClip, resultDatasetClip,
                                    overlayAnalystParamClip);
        
                // Releases all resource occupied by the workspace
                workspace.dispose();
            }
      • clip

        public static boolean clip(Recordset recordset,
                                   Recordset clipRecordset,
                                   DatasetVector resultDataset,
                                   OverlayAnalystParameter parameter)
        Cut the recordset and crop and delete the objects in the second record set that are not in the second record set.

        note:

        1. The type of the clipping record set (second record set) must be a face, and the set of records to be cut (the first recordset) can be points, lines, faces.
        2. In the cut record set, only objects that fall within the clipping record set polygon are output to the result dataset.
        3. Crop the record set, the geographic coordinates of the set of records and the resulting dataset must be consistent.
        4. clip and intersect are consistent in space processing, the difference is that the results of the data set attribute processing, clip analysis is used to do the cut, the result data set with the first data set of the same property table structure, where the superposition Invalid parameter object setting for analysis. And the result of the Intersect cross analysis can preserve the fields of the two data sets according to the field setting.
        5. The results of all overlay analyzes do not take into account the system fields of the recordset.

        For a sketch of the clipping, refer to the description of another overloaded method clip .

        Parameters:
        recordset - The set of records that are cut, also known as the first recordset. The record set type can be point, line and face.
        clipRecordset - The set of records used for cropping, also called the second set of records. The record set type must be a face type.
        resultDataset - The data set that holds the cropped results.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing. The object setting is invalid here.
        Returns:
        The successful return value is true, and the return value is false.
        Example:
        The following code demonstrates how to crop a line record set.
          public void overlayAnalystClip2() {
                // Returns the record set to be clipped and the record set to be used for clipping
                Workspace workspace = new Workspace();
                String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
                DatasourceConnectionInfo datasourceConnectionInfo = new
                        DatasourceConnectionInfo(rootPath + "/SampleData/shanghai/shanghai.udb",
                                                 "shanghai", "");
                Datasource targetDatasource = workspace.getDatasources().open(
                        datasourceConnectionInfo);
        
                DatasetVector datasetRoad = (DatasetVector) targetDatasource.
                                            getDatasets().get("Road_L");
                QueryParameter queryParamCliped = new QueryParameter();
                queryParamCliped.setAttributeFilter("ClassID=430110");
                queryParamCliped.setHasGeometry(true);
                Recordset queryResultCliped = datasetRoad.query(queryParamCliped);
        
                DatasetVector datasetPark = (DatasetVector) targetDatasource.
                                            getDatasets().get("Park_R");
                QueryParameter queryParamClip = new QueryParameter();
                queryParamClip.setAttributeFilter("ClassID=370100");
                queryParamClip.setHasGeometry(true);
                Recordset queryResultClip = datasetPark.query(queryParamClip);
        
                // Create a line dataset to save result.
                String resultDatasetClipName = targetDatasource.getDatasets().
                                               getAvailableDatasetName(
                        "resultDatasetClip");
                DatasetVectorInfo datasetvectorInfoClip = new DatasetVectorInfo();
                datasetvectorInfoClip.setType(DatasetType.LINE);
                datasetvectorInfoClip.setName(resultDatasetClipName);
                datasetvectorInfoClip.setEncodeType(EncodeType.NONE);
                DatasetVector resultDatasetClip = targetDatasource.getDatasets().create(
                        datasetvectorInfoClip);
        
                //  Sets overlaying parameters
                OverlayAnalystParameter overlayAnalystParamClip = new
                        OverlayAnalystParameter();
                overlayAnalystParamClip.setTolerance(0.0000015);
        
                // Calls the clip method to achieve the overlay analysis
                OverlayAnalyst.clip(queryResultCliped, queryResultClip,
                                    resultDatasetClip, overlayAnalystParamClip);
        
                // Releases all resource occupied by the workspace
                workspace.dispose();
            }
      • clip

        public static boolean clip(DatasetVector dataset,
                                   Geometry[] clipGeometries,
                                   DatasetVector resultDataset,
                                   OverlayAnalystParameter parameter)
        The vector dataset is cropped and the objects in the data set that are not in the geometric object array are cropped and deleted.
        1. The type of the cut geometry object must be a face, and the data set to be cut can be a point, a line, a face.
        2. In the cut data set, only objects that fall within the crop geometry will be output to the result dataset.
        3. The array of geometric objects used for cropping, the dataset of the reduced data set, and the geographic coordinates of the resulting dataset must be consistent.
        4. clip and intersect are consistent in space processing, the difference is that the results of the data set attribute processing, clip analysis is used to do the cut, the result data set with the first data set of the same property table structure, where the superposition Invalid parameter setting for analysis. And the result of intersect cross analysis can be based on field settings to retain the two data sets of the field.
        5. All overlay results do not take into account the system fields of the dataset.

        For a sketch of the clipping, refer to the description of another overloaded method clip .

        Parameters:
        dataset - The data set that was dropped. The data set type can be point, line and face.
        clipGeometries - An array of geometric objects used to crop, and the geometric objects in the array must be surface geometry objects.
        resultDataset - The data set that holds the cropped results.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing. The object setting is invalid here.
        Returns:
        analysis returns true on success, false if false.
      • erase

        public static boolean erase(DatasetVector dataset,
                                    DatasetVector eraseDataset,
                                    DatasetVector resultDataset,
                                    OverlayAnalystParameter parameter)
        The overlay analysis used to erase the data set, clipping and deleting the objects contained in the second dataset in the first dataset.

        note:

        1. The erasure dataset (the second dataset) must be of a type, and the erased data set (first dataset) can be a point, line, and surface dataset.
        2. Erase the polygon set in the dataset to define the erase area, where the features that fall within these polygons are erased in the erased data set. And the feature elements that fall outside the polygon area are output to the result data set, as opposed to the clip operation.
        3. Erase the dataset, the erasure dataset, and the geographic coordinates of the resulting dataset must be consistent.

        Parameters:
        dataset - The data set that was erased, also called the first dataset. The dataset type is point, line, and face type.
        eraseDataset - The data set used to erase, also called the second dataset. The dataset type must be a surface dataset type.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        analysis successful return value is true, failure return value is false.
      • erase

        public static boolean erase(Recordset recordset,
                                    Recordset eraseRecordset,
                                    DatasetVector resultDataset,
                                    OverlayAnalystParameter parameter)
        An overlay analysis for erasing the recordset, cutting and deleting the objects contained in the second set of records in the first set of records.

        For a detailed description of the erase, see the description of another overloaded method erase .

        Note: The recordset used for erasure, the erased recordset, and the geographic coordinates of the resulting dataset must be consistent.

        Parameters:
        recordset - is being erased by the recordset, also known as the first recordset. The record set is point, line and face type.
        eraseRecordset - The set of records used to erase, also known as the second record set. The record set type must be a face type.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        analysis successful return value is true, failure return value is false.
      • erase

        public static boolean erase(DatasetVector dataset,
                                    Geometry[] eraseGeometries,
                                    DatasetVector resultDataset,
                                    OverlayAnalystParameter parameter)
        The overlay analysis used to erase the data set, cutting the objects contained in the array of geometric objects in the erased data set and deleting them.

        For more information about erase, see the description of another overloaded method erase .

        Note: The array of geometric objects used for erasing, the data sets that are erased, and the geographic coordinates of the resulting dataset must be consistent.

        Parameters:
        dataset - A data set that is erased, which is a point, line, and face type.
        eraseGeometries - An array of geometric objects used to erase, and the geometric objects in the array must be surface geometry objects.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        analysis returns true on success, false if false.
      • identity

        public static boolean identity(DatasetVector dataset,
                                       DatasetVector identityDataset,
                                       DatasetVector resultDataset,
                                       OverlayAnalystParameter parameter)
        For the data set in the same way the superposition of the analysis, the results of the data set to keep the same operation of the data set of all objects and the same operation of the data set with the same operation for the intersection of the data set of objects.

        note:

        1. The same operation is the first data set and the second data set first cross, and then cross the results and then the first data set and an operation. Where the type of the second data set must be a face, and the type of the first data set may be a point, a line, a face data set. If the first data set is a point dataset, all objects of the first dataset are retained in the newly generated data set; if the first data set is a line dataset, the first data set is retained in the newly generated data set But if the first data set is a surface dataset, the result dataset retains the first dataset as a control for all polygons within the bounds of the boundary , And the intersection with the second data set in the intersection of the object is divided into multiple objects.
        2. The identity operation has a similarity to the union operation, except that the union operation preserves all parts of the two datasets, and the identity operation is the part of the first data set that does not intersect the second data set To keep it. The result table of the identity operation comes from the attribute table of the two datasets.
        3. The data set for the same operation must be consistent with the same set of data sets and the geographic coordinates of the resulting data set.

        Parameters:
        dataset - The data set of the same operation can be point, line, and face type.
        identityDataset - The data set used to perform the same operation must be a face type.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        analysis successful return value is true, failure return value is false.
        Example:
        The overlay analysis of the same method is performed for the two surface datasets.
           public void overlayAnalystIdentity1() {
                // Returns the vector dataset that the indetity operation will be performed on and the vector dataset which will be used for the identity operation.
                Workspace workspace = new Workspace();
                String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
                DatasourceConnectionInfo datasourceConnectionInfo = new
                        DatasourceConnectionInfo(
                        rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
                Datasource targetDatasource = workspace.getDatasources().open(
                        datasourceConnectionInfo);
                DatasetVector datasetIdentitied = (DatasetVector) targetDatasource.
                                                  getDatasets().get("Frame_R");
                DatasetVector datasetIdentity = (DatasetVector) targetDatasource.
                                                getDatasets().get("ResidentialArea");
        
                // Create a region dataset to save result.
                String resultDatasetIdentityName = targetDatasource.getDatasets().
                                                   getAvailableDatasetName(
                        "resultDatasetIdentity");
                DatasetVectorInfo datasetvectorInfoIdentity = new DatasetVectorInfo();
                datasetvectorInfoIdentity.setType(DatasetType.REGION);
                datasetvectorInfoIdentity.setName(resultDatasetIdentityName);
                datasetvectorInfoIdentity.setEncodeType(EncodeType.NONE);
                DatasetVector resultDatasetIdentity = targetDatasource.getDatasets().
                                                      create(datasetvectorInfoIdentity);
        
                //  Sets overlaying parameters
                OverlayAnalystParameter overlayAnalystParamIdentity = new
                        OverlayAnalystParameter();
                overlayAnalystParamIdentity.setOperationRetainedFields(new String[] {
                        "ClassID"});
                overlayAnalystParamIdentity.setSourceRetainedFields(new String[] {
                        "Name"});
                overlayAnalystParamIdentity.setTolerance(0.0089078724);
        
                // Calls the identity method to achieve the identity operation
                OverlayAnalyst.identity(datasetIdentitied, datasetIdentity,
                                     resultDatasetIdentity, overlayAnalystParamIdentity);
        
                // Releases all resource occupied by the workspace
                workspace.dispose();
            }
      • identity

        public static boolean identity(Recordset recordset,
                                       Recordset identityRecordset,
                                       DatasetVector resultDataset,
                                       OverlayAnalystParameter parameter)
        For the superposition of the same set of records, the results of the data set to keep the unified operation of the records of all the objects and the same operation of the recordset and the same operation used to record the intersection of the set of objects.

        For a detailed description of the same operation, see the description of another overloaded method identity .

        Note that the recordsets used for the same operation must be consistent with the same set of recordsets and the geographic coordinates of the resulting data set.

        Parameters:
        recordset - The same set of records, also become the first record set, can be point, line, surface type.
        identityRecordset - The set of records used to perform the same operation also becomes the second record set and must be a face type.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        analysis successful return value is true, failure return value is false.
        Example:
        The following code demonstrates the superposition analysis of the same way for two surface recordsets.
           public void overlayAnalystIdentity2() {
                // Returns the record set that the indetity operation will be performed on and the record set which will be used for the identity operation.
                Workspace workspace = new Workspace();
                String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
                DatasourceConnectionInfo datasourceConnectionInfo = new
                        DatasourceConnectionInfo(
                        rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
                Datasource targetDatasource = workspace.getDatasources().open(
                        datasourceConnectionInfo);
        
                DatasetVector datasetIdentitied = (DatasetVector) targetDatasource.
                                                  getDatasets().get("Frame_R");
                Recordset queryResultIdentitied = datasetIdentitied.getRecordset(false,
                        CursorType.DYNAMIC);
        
                DatasetVector datasetIdentity = (DatasetVector) targetDatasource.
                                                getDatasets().get("ResidentialArea");
                QueryParameter queryParamIdentity = new QueryParameter();
                queryParamIdentity.setAttributeFilter("ClassID = 32023");
                queryParamIdentity.setHasGeometry(true);
                Recordset queryResultIdentity = datasetIdentity.query(
                        queryParamIdentity);
        
                // Create a region dataset to save result.
                String resultDatasetIdentityName = targetDatasource.getDatasets().
                                                   getAvailableDatasetName(
                        "resultDatasetIdentity");
                DatasetVectorInfo datasetvectorInfoIdentity = new DatasetVectorInfo();
                datasetvectorInfoIdentity.setType(DatasetType.REGION);
                datasetvectorInfoIdentity.setName(resultDatasetIdentityName);
                datasetvectorInfoIdentity.setEncodeType(EncodeType.NONE);
                DatasetVector resultDatasetIdentity = targetDatasource.getDatasets().
                                                      create(datasetvectorInfoIdentity);
        
                //  Sets overlaying parameters
                OverlayAnalystParameter overlayAnalystParamIdentity = new
                        OverlayAnalystParameter();
                overlayAnalystParamIdentity.setOperationRetainedFields(new String[] {
                        "ClassID"});
                overlayAnalystParamIdentity.setSourceRetainedFields(new String[] {
                        "Name"});
                overlayAnalystParamIdentity.setTolerance(0.0089078724);
        
                // Calls the identity method to achieve the identity operation
                OverlayAnalyst.identity(queryResultIdentitied, queryResultIdentity,
                                     resultDatasetIdentity, overlayAnalystParamIdentity);
        
                // Releases all resource occupied by the workspace
                workspace.dispose();
            }
      • identity

        public static boolean identity(DatasetVector dataset,
                                       Geometry[] identityGeometries,
                                       DatasetVector resultDataset,
                                       OverlayAnalystParameter parameter)
        For the data set in the same way the superposition of the analysis, the results of the data set to keep the same operation of the data set of all objects and the same operation of the data set with the same operation for the intersection of geometric object array object.

        For a detailed description of the same operation, see the description of another overloaded method identity .

        Note that the array of geometric objects used for the same operation must be consistent with the same set of data sets and the geographic coordinates of the resulting data set.

        Parameters:
        dataset - The data set of the same operation can be point, line, and face type.
        identityGeometries - An array of geometric objects used to perform the same operation, the geometric objects in the array must be surface geometry objects.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        Returns true if the analysis succeeds, false otherwise.
      • intersect

        public static boolean intersect(DatasetVector dataset,
                                        DatasetVector intersectDataset,
                                        DatasetVector resultDataset,
                                        OverlayAnalystParameter parameter)
        The superposition analysis of the intersection mode is performed, and the data sets to be subjected to the intersection superposition analysis are not included in the data set for the data set used to intersect the superimposition analysis to be cut and deleted. That is, the overlapping parts of the two data sets will be output to the result data set and the rest will be excluded.

        note:

        1. The datasets that are analyzed by the intersection overlay can be point types, line types, and face types, and the dataset used to intersect the overlay analysis must be a face type. The feature objects (points, lines, and faces) of the first data set are split at the intersection with the polygons in the second data set (except for the point object), and the split result is output to the result data set.
        2. The intersecting operation is the same as the spatial geometry of the result dataset obtained by the clipping operation, but the cropping operation does not do any processing on the attribute table, and the intersection operator allows the user to select the attribute field that needs to be reserved.
        3. The datasets used for intersecting overlay analysis, the datasets of the intersecting overlay analysis, and the geographic coordinates of the resulting dataset must be consistent.

        Parameters:
        dataset - The data set of the dataset can be a point, line, and surface dataset.
        intersectDataset - The dataset used to intersect the overlay analysis, which must be a surface dataset.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        analysis successful return value is true, failure return value is false.
        Example:
        The following code demonstrates a superposition analysis of the intersection of two surface datasets.
         public void overlayAnalystIntersect1() {
                // Returns the intersected vector dataset and the intersecting vector dataset 
                Workspace workspace = new Workspace();
                String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
                DatasourceConnectionInfo datasourceConnectionInfo = new
                        DatasourceConnectionInfo(
                        rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
                Datasource targetDatasource = workspace.getDatasources().open(
                        datasourceConnectionInfo);
                DatasetVector datasetIntersected = (DatasetVector) targetDatasource.
                                                   getDatasets().get("Frame_R");
                DatasetVector datasetIntersect = (DatasetVector) targetDatasource.
                                                 getDatasets().get("ResidentialArea");
        
                // Create a region dataset to save result.
                String resultDatasetIntersectName = targetDatasource.getDatasets().
                                                    getAvailableDatasetName(
                        "resultDatasetIntersect");
                DatasetVectorInfo datasetvectorInfoIntersect = new DatasetVectorInfo();
                datasetvectorInfoIntersect.setType(DatasetType.REGION);
                datasetvectorInfoIntersect.setName(resultDatasetIntersectName);
                datasetvectorInfoIntersect.setEncodeType(EncodeType.NONE);
                DatasetVector resultDatasetIntersect = targetDatasource.getDatasets().
                                                       create(
                        datasetvectorInfoIntersect);
        
                //  Sets overlaying parameters
                OverlayAnalystParameter overlayAnalystParamIntersect = new
                        OverlayAnalystParameter();
                overlayAnalystParamIntersect.setOperationRetainedFields(new String[] {
                        "ClassID"});
                overlayAnalystParamIntersect.setSourceRetainedFields(new String[] {
                        "Name"});
                overlayAnalystParamIntersect.setTolerance(0.0000011074);
        
                // Calls the intersect method to achieve the intersect analysis
                OverlayAnalyst.intersect(datasetIntersected, datasetIntersect,
                                         resultDatasetIntersect,
                                         overlayAnalystParamIntersect);
        
                // Releases all resource occupied by the workspace
                workspace.dispose();
        
            }
      • intersect

        public static boolean intersect(Recordset recordset,
                                        Recordset intersectRecordset,
                                        DatasetVector resultDataset,
                                        OverlayAnalystParameter parameter)
        The superposition analysis of the intersecting mode is performed, and the set of records to be subjected to the intersection superposition analysis is not included in the object set in the recording set for intersecting the superimposition analysis to be cut and deleted.

        For a detailed description of intersecting operations, see the description of another overloaded methodintersect .

        Note that the recordsets used to intersect the overlay analysis, the recordsets that are intersected, and the geographic coordinates of the resulting data set must be consistent.

        Parameters:
        recordset - The set of records that are superimposed by the intersection, which can be point, line, and face types.
        intersectRecordset - The set of records used to intersect the overlay analysis must be surface.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        The successful return value is true, and the return failure value is false.
        Example:
        The following code demonstrates the superposition analysis of the intersection of two faces.
           public void overlayAnalystIntersect2() {
                // Returns the intersected record set and the intersecting record set 
                Workspace workspace = new Workspace();
                String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
                DatasourceConnectionInfo datasourceConnectionInfo = new
                        DatasourceConnectionInfo(
                        rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
                Datasource targetDatasource = workspace.getDatasources().open(
                        datasourceConnectionInfo);
        
                DatasetVector datasetIntersected = (DatasetVector) targetDatasource.
                                                   getDatasets().get("Frame_R");
                Recordset queryResultIntersected = datasetIntersected.getRecordset(false,
                        CursorType.DYNAMIC);
        
                DatasetVector datasetIntersect = (DatasetVector) targetDatasource.
                                                 getDatasets().get("ResidentialArea");
                QueryParameter queryParamIntersect = new QueryParameter();
                queryParamIntersect.setAttributeFilter("ClassID = 32023");
                queryParamIntersect.setHasGeometry(true);
                Recordset queryResultIntersect = datasetIntersect.query(
                        queryParamIntersect);
        
                // Create a region dataset to save result.
                String resultDatasetIntersectName = targetDatasource.getDatasets().
                                                    getAvailableDatasetName(
                        "resultDatasetIntersect");
                DatasetVectorInfo datasetvectorInfoIntersect = new DatasetVectorInfo();
                datasetvectorInfoIntersect.setType(DatasetType.REGION);
                datasetvectorInfoIntersect.setName(resultDatasetIntersectName);
                datasetvectorInfoIntersect.setEncodeType(EncodeType.NONE);
                DatasetVector resultDatasetIntersect = targetDatasource.getDatasets().
                                                       create(
                        datasetvectorInfoIntersect);
        
                //  Sets overlaying parameters
                OverlayAnalystParameter overlayAnalystParamIntersect = new
                        OverlayAnalystParameter();
                overlayAnalystParamIntersect.setOperationRetainedFields(new String[] {
                        "ClassID"});
                overlayAnalystParamIntersect.setSourceRetainedFields(new String[] {
                        "Name"});
                overlayAnalystParamIntersect.setTolerance(0.0000011074);
        
                // Calls the intersect method to achieve the intersect analysis
                OverlayAnalyst.intersect(queryResultIntersected, queryResultIntersect,
                                         resultDatasetIntersect,
                                         overlayAnalystParamIntersect);
        
                // Releases all resource occupied by the workspace
                workspace.dispose();
            }
      • intersect

        public static boolean intersect(DatasetVector dataset,
                                        Geometry[] intersectGeometries,
                                        DatasetVector resultDataset,
                                        OverlayAnalystParameter parameter)
        The superposition analysis of the intersection mode is performed, and the data set to be subjected to the intersection superposition analysis is not included in the object cut-out and deleted by the array of face objects used to intersect the superimposition analysis.

        For a detailed description of intersecting operations, see the description of another overloaded methodintersect .

        Note that the array of face objects for intersecting overlay analysis, the datasets that are intersected, and the geographic coordinates of the resulting dataset must be consistent.

        Parameters:
        dataset - The data set of the dataset can be a point, line, and surface dataset.
        intersectGeometries - The array of face objects used to interpolate overlay analysis.
        resultDataset - The dataset where the analysis results are stored.
        parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
        Returns:
        analysis returns true on success, false if false.
      • xOR

        public static boolean xOR(DatasetVector dataset,
                                  DatasetVector xORDataset,
                                  DatasetVector resultDataset,
                                  OverlayAnalystParameter parameter)
        Symmetric difference operation is performed on two surface datasets. That is, the intersection of anti-operation.
      • The data set for symmetric difference analysis, the data set of the symmetric difference analysis, and the geographic coordinate system of the resulting data set must be consistent.

        Symmetric difference operation is the exclusive OR operation of two data sets. The result of the operation is that for each face object, the part that intersects the geometric object in another data set is removed, leaving the remainder. The attribute table of the output of the symmetric difference operation contains the non-system attribute fields of the two input data sets.

Parameters:
dataset - The original data set of the symmetric difference analysis must be a surface dataset.
xORDataset - The data set for symmetric difference analysis must be a surface dataset.
resultDataset - The dataset where the analysis results are stored.
parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
Returns:
analysis successful return value is true, failure return value is false.
Example:
The following code demonstrates the symmetry difference analysis of two surface datasets.
    public void overlayAnalystXOR1() {
        // Returns the two vector dataset involved in the XOR analysis
        Workspace workspace = new Workspace();
        String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
        DatasourceConnectionInfo datasourceConnectionInfo = new
                DatasourceConnectionInfo(
                rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
        Datasource targetDatasource = workspace.getDatasources().open(
                datasourceConnectionInfo);
        DatasetVector datasetXORed = (DatasetVector) targetDatasource.
                                     getDatasets().get("Frame_R");
        DatasetVector datasetXOR = (DatasetVector) targetDatasource.getDatasets().
                                   get("ResidentialArea");

        // Create a region dataset to save result.
        String resultDatasetXORName = targetDatasource.getDatasets().
                                      getAvailableDatasetName(
                "resultDatasetXOR");
        DatasetVectorInfo datasetvectorInfoXOR = new DatasetVectorInfo();
        datasetvectorInfoXOR.setType(DatasetType.REGION);
        datasetvectorInfoXOR.setName(resultDatasetXORName);
        datasetvectorInfoXOR.setEncodeType(EncodeType.NONE);
        DatasetVector resultDatasetXOR = targetDatasource.getDatasets().create(
                datasetvectorInfoXOR);

        //  Sets overlaying parameters
        OverlayAnalystParameter overlayAnalystParamXOR = new
                OverlayAnalystParameter();
        overlayAnalystParamXOR.setTolerance(0.0089078724);

        // Calls the XOR method to achieve the XOR analysis
        OverlayAnalyst.xOR(datasetXORed, datasetXOR, resultDatasetXOR,
                           overlayAnalystParamXOR);

        //Releases all resource occupied by the workspace
        workspace.dispose();
    }
  • xOR

    public static boolean xOR(Recordset recordset,
                              Recordset xORRecordset,
                              DatasetVector resultDataset,
                              OverlayAnalystParameter parameter)
    Symmetric difference analysis is performed on two sets of records.

    For a detailed description of the symmetry difference operation, see the description of another overloaded method xOR .

    Note that the recordset for symmetric difference analysis, the recordsets of the symmetric difference analysis, and the geographic coordinate system of the resulting data set must be consistent.

    Parameters:
    recordset - The source recordset of the symmetric difference analysis must be surface.
    xORRecordset - The set of records used for symmetric differential analysis must be surface.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    The successful return value is true, and the return value is false.
    Example:
    The following code demonstrates the symmetry difference analysis of two surface datasets.
       public void overlayAnalystXOR2() {
            // Returns the two vector dataset involved in the XOR analysis
            Workspace workspace = new Workspace();
            String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
            DatasourceConnectionInfo datasourceConnectionInfo = new
                    DatasourceConnectionInfo(
                    rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
            Datasource targetDatasource = workspace.getDatasources().open(
                    datasourceConnectionInfo);
    
            DatasetVector datasetXORed = (DatasetVector) targetDatasource.
                                         getDatasets().get("Frame_R");
            Recordset queryResultXORed = datasetXORed.getRecordset(false,
                    CursorType.DYNAMIC);
    
            DatasetVector datasetXOR = (DatasetVector) targetDatasource.getDatasets().
                                       get("ResidentialArea");
            QueryParameter queryParamXOR = new QueryParameter();
            queryParamXOR.setAttributeFilter("ClassID = 32023");
            queryParamXOR.setHasGeometry(true);
            Recordset queryResultXOR = datasetXOR.query(queryParamXOR);
    
            // Creates a region dataset to save result
            String resultDatasetXORName = targetDatasource.getDatasets().
                                          getAvailableDatasetName(
                    "resultDatasetXOR");
            DatasetVectorInfo datasetvectorInfoXOR = new DatasetVectorInfo();
            datasetvectorInfoXOR.setType(DatasetType.REGION);
            datasetvectorInfoXOR.setName(resultDatasetXORName);
            datasetvectorInfoXOR.setEncodeType(EncodeType.NONE);
            DatasetVector resultDatasetXOR = targetDatasource.getDatasets().create(
                    datasetvectorInfoXOR);
    
            //  Sets overlaying parameters
            OverlayAnalystParameter overlayAnalystParamXOR = new
                    OverlayAnalystParameter();
            overlayAnalystParamXOR.setTolerance(0.0089078724);
    
            // Calls the XOR method to achieve the XOR analysis
            OverlayAnalyst.xOR(queryResultXORed, queryResultXOR, resultDatasetXOR,
                               overlayAnalystParamXOR);
    
            // Releases all resource occupied by the workspace
            workspace.dispose();
        }
  • xOR

    public static boolean xOR(DatasetVector dataset,
                              Geometry[] xorGeometries,
                              DatasetVector resultDataset,
                              OverlayAnalystParameter parameter)
    The opposite data set uses the surface object array to perform the symmetry difference analysis operation, that is, the intersection negation operation. The result of the operation is that for each face object in the face dataset, the part that intersects the object in the face array is removed, leaving the remaining part.

    For a detailed description of the symmetry difference operation, see the description of another overloaded method xOR .

    Note that the surface object array for symmetric difference analysis, the source data set of the symmetric difference analysis, and the geographic coordinate system of the resulting data set must be consistent.

    Parameters:
    dataset - The source data set of the symmetric difference analysis must be a surface dataset.
    xorGeometries - An array of face objects for symmetric difference analysis.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    Returns true if the analysis succeeds, false otherwise.
  • union

    public static boolean union(DatasetVector dataset,
                                DatasetVector unionDataset,
                                DatasetVector resultDataset,
                                OverlayAnalystParameter parameter)
    The result data is used to collect the data sets of the merged superimposed analysis and all the objects in the data set for merging the superimposed analysis, and the intersecting part is subjected to intersecting and segmentation operations.

    note:

    1. Merging is the computation of two datasets, and the merged layer preserves all the layer elements of the two datasets, only between the two datasets.
    2. After the union operation, the two faces are divided at the intersection of polygons, and the geometry and attribute information of both datasets are output to the result dataset.
    3. The data set used to merge the overlay analysis, the dataset of the merged overlay, and the geographic coordinate system of the resulting dataset must be consistent.

    Parameters:
    dataset - The datasets that are combined to be aggregated must be surface dataset types.
    unionDataset - The dataset used to merge the overlay analysis must be a surface dataset type.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    analysis successful return value is true, failure return value is false.
    Example:
    The following code demonstrates a superposition analysis of the merging of two surface datasets.
     public void overlayAnalystUnion1() {
            // Returns the two vector dataset involved in the union analysis
            Workspace workspace = new Workspace();
            String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
            DatasourceConnectionInfo datasourceConnectionInfo = new
                    DatasourceConnectionInfo(rootPath + "/changchun/changchun.udb",
                                             "changchun", "");
            Datasource targetDatasource = workspace.getDatasources().open(
                    datasourceConnectionInfo);
            DatasetVector datasetUnioned = (DatasetVector) targetDatasource.
                                           getDatasets().get("ResidentialArea");
            DatasetVector datasetUnion = (DatasetVector) targetDatasource.
                                         getDatasets().get("Frame_R");
    
            // Create a region dataset to save result
            String resultDatasetUnionName = targetDatasource.getDatasets().
                                            getAvailableDatasetName(
                    "resultDatasetUnion");
            DatasetVectorInfo datasetvectorInfoUnion = new DatasetVectorInfo();
            datasetvectorInfoUnion.setType(DatasetType.REGION);
            datasetvectorInfoUnion.setName(resultDatasetUnionName);
            datasetvectorInfoUnion.setEncodeType(EncodeType.NONE);
            DatasetVector resultDatasetUnion = targetDatasource.getDatasets().
                                               create(datasetvectorInfoUnion);
    
            //  Sets overlaying parameters
            OverlayAnalystParameter overlayAnalystParamUnion = new
                    OverlayAnalystParameter();
            overlayAnalystParamUnion.setOperationRetainedFields(new String[] {
                    "Name"});
            overlayAnalystParamUnion.setSourceRetainedFields(new String[] {
                    "ClassID"});
            overlayAnalystParamUnion.setTolerance(0.0000011074);
    
            // Calls the union method to achieve the union analysis
            OverlayAnalyst.union(datasetUnioned, datasetUnion, resultDatasetUnion,
                                 overlayAnalystParamUnion);
    
            // Releases all resource occupied by the workspace
            workspace.dispose();
    
        }
  • union

    public static boolean union(Recordset recordset,
                                Recordset unionRecordset,
                                DatasetVector resultDataset,
                                OverlayAnalystParameter parameter)
    The result data is used to collect the recordsets of the merged overlay analysis and all the objects in the set of records used to merge the superimposed analysis, and the intersecting parts are subjected to intersecting and segmentation operations.

    For a detailed description of the merge operation, see the description of another overloaded method union . Note that the recordsets used to merge the overlay analysis, the recordsets of the merged overlays, and the geographic coordinates of the resulting datasets must be consistent.

    Parameters:
    recordset - The recordsets that are merged and superimposed must be surface.
    unionRecordset - The recordset used to merge the overlay analysis must be surface.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    analysis successful return value is true, failure return value is false.
    Example:
    The following code demonstrates a superposition analysis of the merging of two face recordsets.
      public void overlayAnalystUnion2() {
            // Returns the two record set involved in the union analysis
            Workspace workspace = new Workspace();
            String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
            DatasourceConnectionInfo datasourceConnectionInfo = new
                    DatasourceConnectionInfo(
                    rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
            Datasource targetDatasource = workspace.getDatasources().open(
                    datasourceConnectionInfo);
    
            DatasetVector datasetUnioned = (DatasetVector) targetDatasource.
                                           getDatasets().get("ResidentialArea");
            QueryParameter queryParamUnioned = new QueryParameter();
            queryParamUnioned.setAttributeFilter("ClassID = 32023");
            queryParamUnioned.setHasGeometry(true);
            Recordset queryResultUnioned = datasetUnioned.query(queryParamUnioned);
    
            DatasetVector datasetUnion = (DatasetVector) targetDatasource.
                                         getDatasets().get("Frame_R");
            Recordset queryResultUnion = datasetUnion.getRecordset(false,
                    CursorType.DYNAMIC);
    
            // Create a region dataset to save result
            String resultDatasetUnionName = targetDatasource.getDatasets().
                                            getAvailableDatasetName(
                    "resultDatasetUnion");
            DatasetVectorInfo datasetvectorInfoUnion = new DatasetVectorInfo();
            datasetvectorInfoUnion.setType(DatasetType.REGION);
            datasetvectorInfoUnion.setName(resultDatasetUnionName);
            datasetvectorInfoUnion.setEncodeType(EncodeType.NONE);
            DatasetVector resultDatasetUnion = targetDatasource.getDatasets().
                                               create(datasetvectorInfoUnion);
    
            //  Sets overlaying parameters
            OverlayAnalystParameter overlayAnalystParamUnion = new
                    OverlayAnalystParameter();
            overlayAnalystParamUnion.setOperationRetainedFields(new String[] {
                    "Name"});
            overlayAnalystParamUnion.setSourceRetainedFields(new String[] {
                    "ClassID"});
            overlayAnalystParamUnion.setTolerance(0.0000011074);
    
            //Calls the union method to achieve the union analysis
            OverlayAnalyst.union(queryResultUnioned, queryResultUnion,
                                 resultDatasetUnion, overlayAnalystParamUnion);
    
            // Releases all resource occupied by the workspace
            workspace.dispose();
        }
  • union

    public static boolean union(DatasetVector dataset,
                                Geometry[] unionGeometries,
                                DatasetVector resultDataset,
                                OverlayAnalystParameter parameter)
    The data set is used to store the data set of the merged overlay analysis and all the objects in the array of face objects used to merge the superimposed analysis, and the intersecting part is subjected to intersecting and segmentation operations. The

    For a detailed description of the merge operation, see the description of another overloaded method union .

    Note that the array of surface objects used to merge the overlay analysis, the datasets of the merged overlays, and the geographic coordinates of the resulting dataset must be consistent.

    Parameters:
    dataset - The datasets that are aggregated and analyzed must be surface datasets.
    unionGeometries - An array of face objects used to merge the overlay analysis.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    Returns true if the analysis succeeds and returns false.
  • update

    public static boolean update(DatasetVector dataset,
                                 DatasetVector updateDataset,
                                 DatasetVector resultDataset,
                                 OverlayAnalystParameter parameter)
    For the overlay analysis of the update of the two data sets, the part of the data set for updating is replaced with the updated data set, which is a process of first erasing and pasting.

    The dataset used to update the overlay analysis, the dataset of the updated overlay analysis, and the geographic coordinates of the resulting dataset must be consistent.

    The first dataset and the type of the second dataset must be a surface dataset. The result data set retains the geometry and attribute information of the updated data set.

    Parameters:
    dataset - The dataset that is updated by the overlay analysis must be a face type.
    updateDataset - The dataset used to update the overlay analysis must be a surface dataset.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    analysis successful return value is true, failure return value is false.
    Example:
    The following code demonstrates a superposition of the update of the two data sets.
     public void overlayAnalystUpdate1() {
            // Returns the two vector dataset involved in the update analysis
            Workspace workspace = new Workspace();
            String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
            DatasourceConnectionInfo datasourceConnectionInfo = new
                    DatasourceConnectionInfo(
                    rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
            Datasource targetDatasource = workspace.getDatasources().open(
                    datasourceConnectionInfo);
            DatasetVector datasetUpdated = (DatasetVector) targetDatasource.
                                           getDatasets().get("Frame_R");
            DatasetVector datasetUpdate = (DatasetVector) targetDatasource.
                                          getDatasets().get("ResidentialArea");
    
            // Create a region dataset to save result
            String resultDatasetUpdateName = targetDatasource.getDatasets().
                                             getAvailableDatasetName(
                    "resultDatasetUpdate");
            DatasetVectorInfo datasetvectorInfoUpdate = new DatasetVectorInfo();
            datasetvectorInfoUpdate.setType(DatasetType.REGION);
            datasetvectorInfoUpdate.setName(resultDatasetUpdateName);
            datasetvectorInfoUpdate.setEncodeType(EncodeType.NONE);
            DatasetVector resultDatasetUpdate = targetDatasource.getDatasets().
                                                create(datasetvectorInfoUpdate);
    
            //  Sets overlaying parameters
            OverlayAnalystParameter overlayAnalystParamUpdate = new
                    OverlayAnalystParameter();
            overlayAnalystParamUpdate.setTolerance(0.0089078724);
    
            // Calls the update method to achieve update analysis
            OverlayAnalyst.update(datasetUpdated, datasetUpdate,
                                  resultDatasetUpdate, overlayAnalystParamUpdate);
    
            // Releases all resource occupied by the workspace
            workspace.dispose();
        }
  • update

    public static boolean update(Recordset recordset,
                                 Recordset updateRecordset,
                                 DatasetVector resultDataset,
                                 OverlayAnalystParameter parameter)
    The overlay analysis is used to update the two sets of recordsets. The update operation is a copy of the recordset used to update it and the overlapped part of the updated recordset, which is a process of first erasing and pasting.

    For a detailed description of the update operation, see the description of another overloaded method update .

    Note that the set of records used to update the overlay analysis, the recordset of the updated overlay analysis, and the geographic coordinates of the resulting dataset must be consistent.

    Parameters:
    recordset - The recordset that is updated by the overlay analysis must be a face type.
    updateRecordset - The set of records used to update the overlay analysis must be a face type.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    analysis successful return value is true, failure return value is false.
    Example:
    The following code demonstrates an overlay analysis of how the two faces are updated.
       public void overlayAnalystUpdate2() {
            // Returns the two record set involved in the update analysis
            Workspace workspace = new Workspace();
            String rootPath = android.os.Environment.getExternalStorageDirectory().getAbsolutePath();
            DatasourceConnectionInfo datasourceConnectionInfo = new
                    DatasourceConnectionInfo(
                    rootPath + "/SampleData/changchun/changchun.udb", "changchun", "");
            Datasource targetDatasource = workspace.getDatasources().open(
                    datasourceConnectionInfo);
    
            DatasetVector datasetUpdated = (DatasetVector) targetDatasource.
                                           getDatasets().get("Frame_R");
            Recordset queryResultUpdated = datasetUpdated.getRecordset(false,
                    CursorType.DYNAMIC);
    
            DatasetVector datasetUpdate = (DatasetVector) targetDatasource.
                                          getDatasets().get("ResidentialArea");
            QueryParameter queryParamUpdate = new QueryParameter();
            queryParamUpdate.setAttributeFilter("ClassID = 32023");
            queryParamUpdate.setHasGeometry(true);
            Recordset queryResultUpdate = datasetUpdate.query(queryParamUpdate);
    
            // Create a region dataset to save result
            String resultDatasetUpdateName = targetDatasource.getDatasets().
                                             getAvailableDatasetName(
                    "resultDatasetUpdate");
            DatasetVectorInfo datasetvectorInfoUpdate = new DatasetVectorInfo();
            datasetvectorInfoUpdate.setType(DatasetType.REGION);
            datasetvectorInfoUpdate.setName(resultDatasetUpdateName);
            datasetvectorInfoUpdate.setEncodeType(EncodeType.NONE);
            DatasetVector resultDatasetUpdate = targetDatasource.getDatasets().
                                                create(datasetvectorInfoUpdate);
    
            //  Sets overlaying parameters
            OverlayAnalystParameter overlayAnalystParamUpdate = new
                    OverlayAnalystParameter();
            overlayAnalystParamUpdate.setTolerance(0.0000013678);
    
            // Calls the update method to achieve the update analysis
            OverlayAnalyst.update(queryResultUpdated, queryResultUpdate,
                                  resultDatasetUpdate, overlayAnalystParamUpdate);
    
            // Releases all resource occupied by the workspace
            workspace.dispose();
        }
  • update

    public static boolean update(DatasetVector dataset,
                                 Geometry[] updateGeometries,
                                 DatasetVector resultDataset,
                                 OverlayAnalystParameter parameter)
    The overlay data set is updated by the overlay method of the face array, and the overlapped part of the array with the updated object is replaced with the updated array of face objects. It is a process of first erasing and pasting.

    For a detailed description of the update operation, see the description of another overloaded method update .

    Note that the array of face objects used to update the overlay analysis, the dataset of the updated overlay analysis, and the geographic coordinates of the resulting dataset must be consistent.

    Parameters:
    dataset - The dataset that is updated by the overlay analysis must be a surface dataset.
    updateGeometries - An array of face objects used to update the overlay analysis.
    resultDataset - The dataset where the analysis results are stored.
    parameter - Overrides the parsed parameter object, which is used to set the parsing parameters such as reserved fields when parsing.
    Returns:
    analysis returns true on success, false if false.
  • clipCAD

    public static boolean clipCAD(DatasetVector dataset,
                                  Geometry clipRegion,
                                  DatasetVector resultDataset,
                                  boolean bClipInRegion,
                                  boolean bErase,
                                  double dTolerace)
    Clips CAD
    Parameters:
    dataset - The vector dataset to be clipped.
    clipRegion - the clipping area
    resultDataset - the resulting dataset
    bClipInRegion - whether it is within the clipping area. True means yes
    bErase - Whether to erase
    dTolerace - the tolerance
    Returns:
    Whether it is successful or not to clip.
  • clipText

    public static boolean clipText(DatasetVector dataset,
                                   Geometry clipRegion,
                                   DatasetVector resultDataset,
                                   boolean bClipInRegion,
                                   boolean bErase,
                                   double dTolerace)
    Clips a text dataset
    Parameters:
    dataset - The vector dataset to be clipped.
    clipRegion - the clipping area
    resultDataset - the resulting dataset
    bClipInRegion - whether it is within the clipping area. True means yes
    bErase - Whether to erase
    dTolerace - the tolerance
    Returns:
    Whether it is successful or not to clip.